import request from '@/utils/request'
import { UserDTO } from '@/model/auth/UserDTO'
import { PageDate } from '@/model'

// 获取用户列表
export function pageUserList(params: {}): Promise<PageDate<UserDTO>> {
  return request.get('/api/auth/user/page', params)
}
// 新增用户
export function addUserApi(data: UserDTO) {
  return request.post('/api/auth/user', data)
}
// 修改用户
export function updateUserApi(data:UserDTO) {
  return request.put(`/api/auth/user/${data.id}`, data)
}
// 删除用户
export function deleteUserApi(id:number) {
  return request.delete(`/api/auth/user/${id}`)
}
